<template>
  <span v-if="!showEditForm || useModalDlg4Edit">

    <search-criteria
      :options="searchOptions"
      @clear="onRefresh()"
      @search-btn-click="onSearchBtnClick"
      @adv-search-btn-click="onAdvSearchBtnClick"
      @adv-cancel-btn-click="onRefresh()"
      @create="onCreate()"
    />
    <a-table
      bordered
      :scroll="{ x: 1600 }"
      :columns="columns"
      :row-key="record => record.id"
      :data-source="tableData"
      :pagination="pagination"
      :loading="loading"
      @change="onTableChange"
    >


      <template #operation="{ record }">
        <base-operation
                @view="onView(record)"
                @edit="onEdit(record)"
                @delete="onDelete(record)"
        />

      </template>

    </a-table>

  </span>
  <edit-form-content
    ref="editFormContent"
    v-model:form-data="editFormData"
    title="详情"
    :sub-title="editFormSubTitle"
    :use-modal-dlg4-edit="useModalDlg4Edit"
    :show-edit-form="showEditForm"
    :columns="columns"
    :operation="operation"
    :validate-rules="validateRules"
    @cancel="onCancel"
    @ok="onSave"
  />
</template>

<script src="./${classInfo.className?uncap_first}-list.ts" lang="ts"></script>
